﻿@model MvcSiteMapProvider.Web.Html.Models.SiteMapHelperModel
@using System.Web.Mvc.Html
@using MvcSiteMapProvider.Web.Html.Models
@if (Model.Nodes.Count > 0)
{
    var rootNode = Model.Nodes[0];
    foreach (var moduleNode in rootNode.Children)
    {
        if (moduleNode.IsInCurrentPath)
        {
            foreach (var subModuleNode in moduleNode.Children)
            {
    <div class="subnav">
        <div class="subnav-title">
            <a class='toggle-subnav'><i class="icon-chevron-down" style="margin: 3px;"></i><span>@subModuleNode.Title</span></a>
        </div>
        <ul class="subnav-menu">
            @foreach (var itemNode in subModuleNode.Children)
            {
                <li><a href="@itemNode.Url" @(itemNode.IsCurrentNode?"class=active":"")>@itemNode.Title</a></li>
            }
        </ul>
    </div>
            }
        }
    }
}